<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .outerDiv {
            width: 500px;
            height: 300px;
            border: 1px solid green;
            background-color: blanchedalmond;
        }
        .innerDiv{
            width: 100px;
            height: 100px;
            border: 1px solid rebeccapurple;
            /* display:inline;  block块 inline行   不合适，丢失宽和高*/
        }
        .d1{
            background-color: aquamarine;
            float: right;
        }
        .d2{
            background-color: chartreuse;
            float: right;
        }
        .d3{
            background-color: cyan;
            float: right;
        }
    </style>
</head>

<body>
    <div class="outerDiv">
        <div class="innerDiv d1">diva</div>  <!--浮动在父级块元素的右边-->
        <div class="innerDiv d2">divb</div>
        <div class="innerDiv d3">divc</div>
    </div>
</body>

</html>